/* Copyright  2009
   @Author
   Richard Changde Yin            e-mail yinchangde@hotmail.com

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; version 2 of the License.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */

/*
   @filename: errmsg_print.h
   This file and these functions are a stopgap until all the
   sql_print_foo() function calls are replaced with calls to
   errmsg_printf()
*/

#ifndef __ERRMSG_PRINT_H__
#define __ERRMSG_PRINT_H__

#define ERRMSG_LVL_DBUG  1
#define ERRMSG_LVL_INFO  2
#define ERRMSG_LVL_WARN  3
#define ERRMSG_LVL_ERROR 4

// todo: add __attribute__((format(printf, 1, 2)))
bool errmsg_printf (int priority, char const *format, ...);

void sql_perror (const char *message);

extern int g_errmsg_level  ;

#endif /* __ERRMSG_PRINT_H__ */


